package com.fer.config;

import com.fer.intercepter.BossIntercepter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

//登录拦截器配置
@Configuration
public class LoginConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new BossIntercepter())
                .addPathPatterns("/**")
        .excludePathPatterns("/login")
        .excludePathPatterns("/register")
        .excludePathPatterns("/findusername");
        super.addInterceptors(registry);
    }
}
